package com.example.demo.models.user;

import com.example.demo.models.base.BaseEntity;
import gaarason.database.annotation.Column;
import gaarason.database.annotation.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.stereotype.Repository;

/**
 * @author lucifer
 * @since 2024-01-31-11:14
 */
@Data
@ToString(callSuper = true)
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@Table(name = "user_phones")
public class UserPhone extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** auto generator start **/
    @Column(name = "number", length = 12L, comment = "学生：学号 老师：工号")
    private String number;

    @Column(name = "type", comment = "类型")
    private String type;

    @Column(name = "value", comment = "号码")
    private String value;

    /** auto generator end **/
    @Repository
    public static class Model extends BaseModel<UserPhone, Long> {
        @Override
        protected boolean softDeleting() {
            return true;
        }
    }

}
